package com.xbongbong.workflow.model.impl;

import com.xbongbong.workflow.domain.dao.WorkflowExecutionDao;
import com.xbongbong.workflow.domain.entity.WorkflowExecutionEntity;
import com.xbongbong.workflow.model.WorkflowExecutionModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author 魏荣杰
 */
@Service("workflowExecutionModel")
public class WorkflowExecutionModelImpl implements WorkflowExecutionModel {
    @Resource
    private WorkflowExecutionDao workflowExecutionDao;

    @Override
    public Long insert(WorkflowExecutionEntity entity) {
        return workflowExecutionDao.insert(entity);
    }

    @Override
    public void insertBatch(List<WorkflowExecutionEntity> list) {
        workflowExecutionDao.insertBatch(list);
    }

    @Override
    public List<WorkflowExecutionEntity> findEntities(Map<String, Object> param) {
        return workflowExecutionDao.findEntities(param);
    }

    @Override
    public Integer getEntityCount(Map<String, Object> param) {
        return workflowExecutionDao.getEntitiesCount(param);
    }

    @Override
    public void update(WorkflowExecutionEntity entity) {
        workflowExecutionDao.update(entity);
    }

    @Override
    public WorkflowExecutionEntity getByKey(Long key, String corpid) {
        return workflowExecutionDao.getByKey(key, corpid);
    }


}
